package zdh.avatar.gui;

import javax.swing.*;
import javax.swing.event.*;
import zdh.avatar.base.*;

/**
 *
 * @author Gem Seeker
 */
public class ModelButtonList implements ListModel<String> {

    private ElementButton[] buttons;
    
    public ModelButtonList(ElementButton[] buttons){
        this.buttons = buttons;
    }
    
    @Override
    public int getSize() {
        return buttons.length;
    }

    @Override
    public String getElementAt(int index) {
        return buttons[index].getButtonName();
    }

    @Override
    public void addListDataListener(ListDataListener l) {   
    }

    @Override
    public void removeListDataListener(ListDataListener l) {
    }
    
    public ElementButton getButton(int i){
        return buttons[i];
    }
}
